{{if validation_errors()}}
<ul class="message error">
    <li>{{validation_errors()}}</li>
</ul>
{{/if}}

<div class="clear"></div>
<form class="block-content form" id="simple_form" method="post" action="create">
    <h1>{{$menu->lang->line('menu')}}</h1>
    <ul class="tabs js-tabs same-height">
        <li class="current"><a href="#tab-locales" title="Locales">{{$menu->lang->line('current')}}</a></li>
        <li><a href="#tab-options" title="Options">{{$menu->lang->line('options')}}</a></li>    
    </ul>
    <div class="tabs-content">

        <div id="tab-locales">
            {{if isset($menu->id)}}{{form_hidden('id', $menu->id)}}{{/if}}

            <fieldset class="grey-bg required">			
                <legend>{{$menu->lang->line('required')}}</legend>
                <p>
                    <label for="simple-required">{{$menu->localize_label('title')}} </label>
                    <input type="text" name="title" id="simple-required" value="{{if isset($menu->title)}}{{$menu->title}}{{/if}}" class="full-width">
                    {{form_error('title')}}
                </p>
            </fieldset>

            <fieldset>
                <legend>{{$menu->lang->line('other_info')}}</legend>			
                <p>
                    <label for="link">{{$menu->lang->line('link')}}</label>				
                    <input type="text" name="link" class="full-width" value="{{if isset($menu->link)}}{{$menu->link}}{{/if}}">				
                </p>

                <p>
                    <label for="order">{{$menu->lang->line('order')}}</label>				
                    <input type="text" name="order" class="full-width" value="{{if isset($menu->order)}}{{$menu->order}}{{/if}}">				
                </p>
				<p>
	                <label for="simple-select">{{$menu->localize_label('parent_id')}}</label>
	                <select name="parent_id" id="simple-select" class="full-width">
	                    {{html_options options=$menu_list selected=$menu->parent_id}}
	                </select>
	            </p>
	            <p>
	                <label>{{$menu->lang->line('position')}}</label>
	                <select name="position" id="simple-select" class="full-width">
	                    {{html_options options=$menu->position_list() selected=$menu->position}}
	                </select>
	            </p>
            </fieldset>
        </div>
        <div id="tab-options">
            <p>
                <label>{{$menu->localize_label('new_page')}}</label>
                <select name="new_page" id="simple-select" class="full-width">
                    {{html_options options=$menu->new_page_list() selected=$menu->new_page}}
                </select>
            </p>

            <p>
                <label>{{$menu->localize_label('type')}}</label>
                <select name="type" id="simple-select" class="full-width">
                    {{html_options options=$menu->type_list() selected=$menu->type}}
                </select>
            </p>            
            <p>
                <label for="simple-select">{{$menu->lang->line('language')}}</label>
                <select name="lang_id" id="simple-select" class="full-width">
                    {{html_options options=$language->get_list() selected=$menu->language_id}}
                </select>
            </p>
            <p>
                <label for="image">{{$menu->lang->line('creator')}}</label>				
                <input type="text" name="creator_id" class="full-width" value=""/>				
            </p>

            <div class="columns">
                <div class="colx2-left">
                    <label for="content">{{$menu->lang->line('simple-calendar')}}</label>
                    <span class="input-type-text margin-right relative">
                        <input type="text" name="simple-calendar" id="simple-calendar" value=""/>
                        <img src="{{base_url()}}data/templates/backend/xgo/images/icons/fugue/calendar-month.png" width="16" height="16">
                    </span> 

                </div>
                <p class="colx2-right">					
                    <label for="active">{{$menu->lang->line('active')}}</label>
                    <input type="checkbox" name="active" id="simple-switch-on" value="1" checked="checked" class="switch" onclick="$(this).setActive();">
                </p>
            </div>
        </div>
        <br/><br/><br/><br/><br /><br /><br />
        <fieldset class="grey-bg no-margin">
            <legend>{{$menu->lang->line('action')}}</legend>
            <p class="input-with-button">
                <button type="submit">{{$menu->lang->line('save')}}</button>
            </p>
        </fieldset>

    </div>
</form>
